﻿@{
    ViewBag.Title = "modiworknew";
}

<table  class=".table-bordered" width="700" border="1" align="center" cellpadding="1" cellspacing="1"  style="border:1px solid blue">
    <tr>
        <td height="40" class="a1">
            <p align="center"><font size="5" color="#FF0000"><b>修改作业</b></font></p>
        </td>
    </tr>

    @if (ViewData["message"].ToString() == "0")
    {  
        <tr>
        <td align="center" class="a3">
            <p>
                <font color="#FF0000" size="5">
                    <b>
                        已过载止日期(@ViewData["date"])，不能修改作业&nbsp;
                    </b>
                </font>
            </p>
            <p>
                <input name="btnBack" type="button" id="btnBack" value="返回" onClick="javascript:history.back();">

            </p>
        </td>
    </tr>
    }
    else {
        
    <tr>
        <td class="a3">
        @using (Html.BeginForm("worksave", "Student", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            //       <form method="POST" enctype="multipart/form-data" name="myform" action="worksave.asp" onSubmit="return CheckForm();">
              
                <div align="center">
                    <center>
                        <table width="90%" border="0" cellpadding="1" cellspacing="1" class="a2">
                            <tr class="a3">
                                <td width="70" valign="top"><span class="style1">作业名称</span></td>
                                <td> @ViewData["zuoyemingchen"]  
                                
                                     @Html.Hidden("workid",ViewData["homeworkID"])
                                      @Html.Hidden("biaoshi",1)     
                              
                                     </td>
                            </tr>
@*                            <tr class="a3">
                                <td width="70" valign="top" class="style1">作业说明</td>
                                <td>@ViewData["zuoyemingshuoming"] </td>
                            </tr>*@

                                  <tr class="a3">
                                    <td width="70" valign="top" class="style2">作业说明</td>
                                    <td>
	  		                              @*<%If Not isnull(rs("pic")) then%>*@
                                        @if (ViewData["pic"]!=null)
                                   {
		                              <table align="center" width="100%">
		                              <tr>
		                                <td align="center"> 

                                            @if(ViewData["filecontenttype"].ToString()=="application/x-shockwave-flash")
                                            {
			 		                           @*   <%
			                            Select Case rs("fileContentType")
		  	                            Case "application/x-shockwave-flash" 
		                              %>
		                              <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0">
		                              <param name="movie" value="@Url.Action("showdetail", new {id=ViewData["id"] })">
		                              <param name="quality" value="high">
		                              <embed  quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>*@
                                            }
                                            else if(ViewData["filecontenttype"].ToString()=="image/gif"||ViewData["filecontenttype"].ToString()=="image/pjpeg")
                                            {

                                    	 <img src="@Url.Action("showdetail", new {id=ViewData["id"] })"/>
                                             

                                            }
		  	                           else
                                       {
                                       //  <img src="@Url.Action("showdetail", new {id=ViewData["id"] })"/>       
		                                 <a href="@Url.Action("download", new {id=ViewData["id"] })">下载文件： @ViewData["filename"]</a>
                                            }
			                             </td>
		                              </tr>
		                              </table>
                                            @*
		                              <%End if%>*@
                        		}
		                         @Html.Raw(ViewData["zuoyemingshuoming"])
		                            </td>
                                  </tr>
                            <tr class="a3">
                                <td width="70" valign="top" class="style1">作业内容</td>
                                <td></td>
                            </tr>
                            <tr class="a3">
                                <td width="70" valign="top" class="style1">
                                    选择上传文件：
                                </td>
                                <td>
                                 @*   <input  type="file" name="ddd"/>*@
                                    <input type="file"  name="file1"/>(文件大小<font color="#FF0000"><b>小于2MB</b></font>，只允许上传<br>
                                    文件类型为 <font color="#FF0000"><b>txt/gif/jpg/swf/doc/xls/zip/rar/prg</b></font>的文件，)
                                </td>
                            </tr>
                            <tr class="a3">
                                <td width="70" valign="top" class="style1">答案说明</td>
                                <td><textarea rows="4" name="AnsMemo" cols="60">@ViewData["datishuoming"]</textarea></td>
                            </tr>
                            <tr class="a3">
                                <td colspan="2">
                                    <p align="center"><input type="submit" value="提交" /><input type="reset" value="全部重写" name="B2">
                                </td>
                            </tr>
                        </table>
                    </center>
                </div>
                }
        </td>
    </tr>
    }
</table>
